<template>
	<view>
		<view class="top-view" :style="{ height: $statusBarHeight() + 250 + 'px' }">
			<image :src="$getImgUrl('mine/ic_wd_bg.png')" mode="widthFix" class="img-bg"></image>

			<uni-header leftIcon="" background="none" :fixed="false" :border="false" color="#fff" title="我的"></uni-header>
			<view :style="{ height: $statusBarHeight() + 60 + 'px' }"></view>
			<view class="user-view-info flex-row-center">
				<view class="avatar-view"><image :src="userInfo.headimgurl" class="img-avatar" mode="aspectFill"></image></view>
				<view class="user-info-right">
					<view class="user-name">{{ userInfo.nickname }}</view>
					<view class="id">ID:{{ userInfo.id }}</view>
				</view>
			</view>

			<view class="money-view flex-row-center">
				<view class="money-item" @click="onWalletClick(0)">
					<view class="money-val">{{ userInfo.coin }}</view>
					<view class="money-text">余额</view>
				</view>
				<view class="money-item" @click="onWalletClick(1)">
					<view class="money-val">{{ userInfo.jifen }}</view>
					<view class="money-text">积分</view>
				</view>
			</view>
		</view>
		<scroll-list
			ref="list"
			:option="{
				size: 5,
				auto: true
			}"
			@refresh="onRefresh"
		>
			<view class="order-view">
				<uni-cell title="我的盒柜" value="全部" valColor="#999" :isLink="true" @click="$navTo('pages/store/store')"></uni-cell>
				<view class="order-menu-list flex-row-between">
					<view class="order-menu" @click="toStore(0)">
						<image :src="$getImgUrl('mine/ic_dxz.png')" mode="widthFix"></image>
						<view>待选择</view>
					</view>
					<view class="order-menu" @click="toStore(1)">
						<image :src="$getImgUrl('mine/ic_dfh.png')" mode="widthFix"></image>
						<view>待发货</view>
					</view>
					<view class="order-menu" @click="toStore(2)">
						<image :src="$getImgUrl('mine/ic_yfh.png')" mode="widthFix"></image>
						<view>已发货</view>
					</view>
					<view class="order-menu" @click="toStore(3)">
						<image :src="$getImgUrl('mine/ic_yhs.png')" mode="widthFix"></image>
						<view>已收回</view>
					</view>
					<view class="order-menu" @click="toStore(4)">
						<image :src="$getImgUrl('mine/ic_ywc.png')" mode="widthFix"></image>
						<view>已完成</view>
					</view>
				</view>
			</view>

			<view class="order-view" style="margin-top: 16rpx;">
				<uni-cell title="我的订单" value="全部" valColor="#999" :isLink="true" @click="$navTo('pages/mine/order/order')"></uni-cell>
				<view class="order-menu-list flex-row-between">
					<view class="order-menu" @click="toOrder(0)">
						<image :src="$getImgUrl('mine/ic_d_dfk.png')" mode="widthFix"></image>
						<view>待付款</view>
					</view>
					<view class="order-menu" @click="toOrder(1)">
						<image :src="$getImgUrl('mine/ic_d_dfh.png')" mode="widthFix"></image>
						<view>待发货</view>
					</view>
					<view class="order-menu" @click="toOrder(2)">
						<image :src="$getImgUrl('mine/ic_d_dsh.png')" mode="widthFix"></image>
						<view>待收货</view>
					</view>
					<view class="order-menu" @click="toOrder(3)">
						<image :src="$getImgUrl('mine/ic_d_ywc.png')" mode="widthFix"></image>
						<view>已完成</view>
					</view>
				</view>
			</view>

			<view class="cell-list-view">
				<uni-cell :icon="$getImgUrl('mine/ic_shdz.png')" title="收货地址" isLink @click="$navTo('pages/mine/address/address')"></uni-cell>
				<uni-cell :icon="$getImgUrl('mine/ic_lxkf.png')" title="联系客服" isLink @click="$navTo('pages/mine/contact/contact')"></uni-cell>
				<uni-cell :icon="$getImgUrl('mine/ic_wtfk.png')" title="问题反馈" isLink @click="$navTo('pages/mine/feedback/feedback')"></uni-cell>
				<uni-cell :icon="$getImgUrl('mine/ic_yhq.png')" title="优惠券" isLink @click="$navTo('pages/mine/coupon/coupon')"></uni-cell>
				<uni-cell :icon="$getImgUrl('mine/ic_swhz.png')" title="商务合作" isLink @click="$navTo('pages/mine/cooperation/cooperation')"></uni-cell>
				<uni-cell :icon="$getImgUrl('mine/ic_gywm.png')" title="关于我们" isLink @click="$navTo('pages/mine/about/about')" :isLine="false"></uni-cell>
			</view>

			<view class="out-btn flex-center" @click="onLoginOut">退出登录</view>
			<view style="height: 30rpx"></view>
		</scroll-list>
		<show-modal></show-modal>
	</view>
</template>

<script src="./mine.js"></script>

<style lang="scss" scoped>
@import './mine.scss';
</style>
